<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>trunk.BIP.Bayes.Melding.Meld</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="trunk.BIP-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/bayesian-inference">Project Homepage</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;trunk ::
        <a href="trunk.BIP-module.html">Package&nbsp;BIP</a> ::
        <a href="trunk.BIP.Bayes-module.html">Package&nbsp;Bayes</a> ::
        <a href="trunk.BIP.Bayes.Melding-module.html">Module&nbsp;Melding</a> ::
        Class&nbsp;Meld
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Meld</h1><p class="nomargin-top"><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Meld</strong>
</pre>

<hr />
Bayesian Melding class

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">K</span>,
        <span class="summary-sig-arg">L</span>,
        <span class="summary-sig-arg">model</span>,
        <span class="summary-sig-arg">ntheta</span>,
        <span class="summary-sig-arg">nphi</span>,
        <span class="summary-sig-arg">alpha</span>=<span class="summary-sig-default">0.5</span>,
        <span class="summary-sig-arg">verbose</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">viz</span>=<span class="summary-sig-default">False</span>)</span><br />
      Initializes the Melding class.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#current_plot" class="summary-sig-name">current_plot</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">series</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">idx</span>,
        <span class="summary-sig-arg">vars</span>=<span class="summary-sig-default">[]</span>,
        <span class="summary-sig-arg">step</span>=<span class="summary-sig-default">0</span>)</span><br />
      Plots the last simulated series</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.current_plot">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#setPhi" class="summary-sig-name">setPhi</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">names</span>,
        <span class="summary-sig-arg">dists</span>=<span class="summary-sig-default">[stats.norm]</span>,
        <span class="summary-sig-arg">pars</span>=<span class="summary-sig-default">[(0,1)]</span>,
        <span class="summary-sig-arg">limits</span>=<span class="summary-sig-default">[(-5,5)]</span>)</span><br />
      Setup the models Outputs, or Phi, and generate the samples from prior distributions
needed for the melding replicates.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.setPhi">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#setTheta" class="summary-sig-name">setTheta</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">names</span>,
        <span class="summary-sig-arg">dists</span>=<span class="summary-sig-default">[stats.norm]</span>,
        <span class="summary-sig-arg">pars</span>=<span class="summary-sig-default">[(0,1)]</span>,
        <span class="summary-sig-arg">lims</span>=<span class="summary-sig-default">[(0,1)]</span>)</span><br />
      Setup the models inputs and generate the samples from prior distributions
needed for the dists the melding replicates.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.setTheta">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#add_salt" class="summary-sig-name">add_salt</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dataset</span>,
        <span class="summary-sig-arg">band</span>)</span><br />
      Adds a few extra uniformly distributed data
points beyond the dataset range.
This is done by adding from a uniform dist.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.add_salt">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#setThetaFromData" class="summary-sig-name">setThetaFromData</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">names</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">limits</span>)</span><br />
      Setup the model inputs and set the prior distributions from the vectors
in data.
This method is to be used when the prior distributions are available in
the form of a sample from an empirical distribution such as a bayesian
posterior.
In order to expand the samples provided, K samples are generated from a
kernel density estimate of the original sample.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.setThetaFromData">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#setPhiFromData" class="summary-sig-name">setPhiFromData</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">names</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">limits</span>)</span><br />
      Setup the model outputs and set their prior distributions from the
vectors in data.
This method is to be used when the prior distributions are available in
the form of a sample from an empirical distribution such as a bayesian
posterior.
In order to expand the samples provided, K samples are generated from a
kernel density estimate of the original sample.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.setPhiFromData">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="run"></a><span class="summary-sig-name">run</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*args</span>)</span><br />
      Runs the model through the Melding inference.model
model is a callable which return the output of the deterministic model,
i.e. the model itself.
The model is run self.K times to obtain phi = M(theta).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#getPosteriors" class="summary-sig-name">getPosteriors</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">t</span>)</span><br />
      Updates the posteriors of the model's output for the last t time steps.
Returns two record arrays:
- The posteriors of the Theta
- the posterior of Phi last t values of time-series. self.L by <code class="link">t</code> arrays.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.getPosteriors">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#filtM" class="summary-sig-name">filtM</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cond</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">limits</span>)</span><br />
      Multiple condition filtering.
Remove values in x[i], if corresponding values in
cond[i] are less than limits[i][0] or greater than
limits[i][1].</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.filtM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#logPooling" class="summary-sig-name">logPooling</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">phi</span>)</span><br />
      Returns the probability associated with each phi[i]
on the pooled pdf of phi and q2phi.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.logPooling">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#abcRun" class="summary-sig-name">abcRun</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">fitfun</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">data</span>=<span class="summary-sig-default">{}</span>,
        <span class="summary-sig-arg">t</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">pool</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">savetemp</span>=<span class="summary-sig-default">False</span>)</span><br />
      Runs the model for inference through Approximate Bayes Computation
techniques. This method should be used as an alternative to the sir.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.abcRun">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#imp_sample" class="summary-sig-name">imp_sample</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">n</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">w</span>)</span><br />
      Importance sampling</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.imp_sample">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#mcmc_run" class="summary-sig-name">mcmc_run</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">t</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">likvariance</span>=<span class="summary-sig-default">10</span>,
        <span class="summary-sig-arg">burnin</span>=<span class="summary-sig-default">1000</span>,
        <span class="summary-sig-arg">nopool</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">method</span>=<span class="summary-sig-default">&quot;MH&quot;</span>,
        <span class="summary-sig-arg">constraints</span>=<span class="summary-sig-default">[]</span>)</span><br />
      MCMC based fitting</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.mcmc_run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#_output_loglike" class="summary-sig-name" onclick="show_private();">_output_loglike</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">prop</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">likfun</span>=<span class="summary-sig-default">like.Normal</span>,
        <span class="summary-sig-arg">likvar</span>=<span class="summary-sig-default">1e-1</span>,
        <span class="summary-sig-arg">po</span>=<span class="summary-sig-default">None</span>)</span><br />
      Returns the log-likelihood of a simulated series</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld._output_loglike">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#sir" class="summary-sig-name">sir</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>=<span class="summary-sig-default">{}</span>,
        <span class="summary-sig-arg">t</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">variance</span>=<span class="summary-sig-default">0.1</span>,
        <span class="summary-sig-arg">pool</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">savetemp</span>=<span class="summary-sig-default">False</span>)</span><br />
      Run the model output through the Sampling-Importance-Resampling algorithm.
Returns 1 if successful or 0 if not.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.sir">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding.Meld-class.html#runModel" class="summary-sig-name">runModel</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">savetemp</span>,
        <span class="summary-sig-arg">t</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">k</span>=<span class="summary-sig-default">None</span>)</span><br />
      Handles running the model k times keeping a temporary savefile for
resuming calculation in case of interruption.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.runModel">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">K</span>,
        <span class="sig-arg">L</span>,
        <span class="sig-arg">model</span>,
        <span class="sig-arg">ntheta</span>,
        <span class="sig-arg">nphi</span>,
        <span class="sig-arg">alpha</span>=<span class="sig-default">0.5</span>,
        <span class="sig-arg">verbose</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">viz</span>=<span class="sig-default">False</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Initializes the Melding class.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>K</code></strong> - : Number of replicates of the model run. Also determines the prior sample size.</li>
        <li><strong class="pname"><code>L</code></strong> - : Number of samples from the Posterior distributions. Usually 10% of K.</li>
        <li><strong class="pname"><code>model</code></strong> - : Callable taking theta as argument and returning phi = M(theta).</li>
        <li><strong class="pname"><code>ntheta</code></strong> - : Number of inputs to the model (parameters).</li>
        <li><strong class="pname"><code>nphi</code></strong> - : Number of outputs of the model (State-variables)</li>
        <li><strong class="pname"><code>verbose</code></strong> - : 0,1, 2: whether to show more information about the computations</li>
        <li><strong class="pname"><code>viz</code></strong> - : Boolean. Wether to show graphical outputs of the fitting process</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="current_plot"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">current_plot</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">series</span>,
        <span class="sig-arg">data</span>,
        <span class="sig-arg">idx</span>,
        <span class="sig-arg">vars</span>=<span class="sig-default">[]</span>,
        <span class="sig-arg">step</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.current_plot">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Plots the last simulated series</p>
<blockquote>
</blockquote>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>series</code></strong> - : Record array with the simulated series.</li>
        <li><strong class="pname"><code>idx</code></strong> - : Integer index of the curve to plot .</li>
        <li><strong class="pname"><code>data</code></strong> - : Dictionary with the full dataset.</li>
        <li><strong class="pname"><code>vars</code></strong> - : List with variable names to be plotted.</li>
        <li><strong class="pname"><code>step</code></strong> - : Step of the chain</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="setPhi"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setPhi</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">names</span>,
        <span class="sig-arg">dists</span>=<span class="sig-default">[stats.norm]</span>,
        <span class="sig-arg">pars</span>=<span class="sig-default">[(0,1)]</span>,
        <span class="sig-arg">limits</span>=<span class="sig-default">[(-5,5)]</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.setPhi">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Setup the models Outputs, or Phi, and generate the samples from prior distributions
needed for the melding replicates.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>names</code></strong> - : list of string with the names of the variables.</li>
        <li><strong class="pname"><code>dists</code></strong> - : is a list of RNG from scipy.stats</li>
        <li><strong class="pname"><code>pars</code></strong> - : is a list of tuples of variables for each prior distribution, respectively.</li>
        <li><strong class="pname"><code>limits</code></strong> - : lower and upper limits on the support of variables.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="setTheta"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setTheta</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">names</span>,
        <span class="sig-arg">dists</span>=<span class="sig-default">[stats.norm]</span>,
        <span class="sig-arg">pars</span>=<span class="sig-default">[(0,1)]</span>,
        <span class="sig-arg">lims</span>=<span class="sig-default">[(0,1)]</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.setTheta">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Setup the models inputs and generate the samples from prior distributions
needed for the dists the melding replicates.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>names</code></strong> - : list of string with the names of the parameters.</li>
        <li><strong class="pname"><code>dists</code></strong> - : is a list of RNG from scipy.stats</li>
        <li><strong class="pname"><code>pars</code></strong> - : is a list of tuples of parameters for each prior distribution, respectivelydists</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="add_salt"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_salt</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dataset</span>,
        <span class="sig-arg">band</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.add_salt">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Adds a few extra uniformly distributed data
points beyond the dataset range.
This is done by adding from a uniform dist.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>dataset</code></strong> - : vector of data</li>
        <li><strong class="pname"><code>band</code></strong> - : Fraction of range to extend [0,1[</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>Salted dataset.</dd>
  </dl>
</td></tr></table>
</div>
<a name="setThetaFromData"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setThetaFromData</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">names</span>,
        <span class="sig-arg">data</span>,
        <span class="sig-arg">limits</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.setThetaFromData">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Setup the model inputs and set the prior distributions from the vectors
in data.
This method is to be used when the prior distributions are available in
the form of a sample from an empirical distribution such as a bayesian
posterior.
In order to expand the samples provided, K samples are generated from a
kernel density estimate of the original sample.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>names</code></strong> - : list of string with the names of the parameters.</li>
        <li><strong class="pname"><code>data</code></strong> - : list of vectors. Samples of a proposed distribution</li>
        <li><strong class="pname"><code>limits</code></strong> - : List of (min,max) tuples for each theta to make sure samples are not generated outside these limits.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="setPhiFromData"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setPhiFromData</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">names</span>,
        <span class="sig-arg">data</span>,
        <span class="sig-arg">limits</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.setPhiFromData">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Setup the model outputs and set their prior distributions from the
vectors in data.
This method is to be used when the prior distributions are available in
the form of a sample from an empirical distribution such as a bayesian
posterior.
In order to expand the samples provided, K samples are generated from a
kernel density estimate of the original sample.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>names</code></strong> - : list of string with the names of the variables.</li>
        <li><strong class="pname"><code>data</code></strong> - : list of vectors. Samples of the proposed distribution.</li>
        <li><strong class="pname"><code>limits</code></strong> - : list of tuples (ll,ul),lower and upper limits on the support of variables.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="getPosteriors"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getPosteriors</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">t</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.getPosteriors">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Updates the posteriors of the model's output for the last t time steps.
Returns two record arrays:
- The posteriors of the Theta
- the posterior of Phi last t values of time-series. self.L by <code class="link">t</code> arrays.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>t</code></strong> - : length of the posterior time-series to return.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="filtM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">filtM</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">cond</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">limits</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.filtM">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Multiple condition filtering.
Remove values in x[i], if corresponding values in
cond[i] are less than limits[i][0] or greater than
limits[i][1].
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>cond</code></strong> - : is an array of conditions.</li>
        <li><strong class="pname"><code>limits</code></strong> - : is a list of tuples (ll,ul) with length equal to number of lines in <code class="link">cond</code> and <code class="link">x</code>.</li>
        <li><strong class="pname"><code>x</code></strong> - : array to be filtered.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="logPooling"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">logPooling</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">phi</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.logPooling">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Returns the probability associated with each phi[i]
on the pooled pdf of phi and q2phi.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>phi</code></strong> - : prior of Phi induced by the model and q1theta.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="abcRun"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">abcRun</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">fitfun</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">data</span>=<span class="sig-default">{}</span>,
        <span class="sig-arg">t</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">pool</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">savetemp</span>=<span class="sig-default">False</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.abcRun">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Runs the model for inference through Approximate Bayes Computation
techniques. This method should be used as an alternative to the sir.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>fitfun</code></strong> - : Callable which will return the goodness of fit of the model to data as a number between 0-1, with 1 meaning perfect fit</li>
        <li><strong class="pname"><code>t</code></strong> - : number of time steps to retain at the end of the of the model run for fitting purposes.</li>
        <li><strong class="pname"><code>data</code></strong> - : dict containing observed time series (lists of length t) of the state variables. This dict must have as many items the number of state variables, with labels matching variables names. Unorbserved variables must have an empty list as value.</li>
        <li><strong class="pname"><code>pool</code></strong> - : if True, Pools the user provided priors on the model's outputs, with the model induced priors.</li>
        <li><strong class="pname"><code>savetemp</code></strong> - : Should temp results be saved. Useful for long runs. Alows for resuming the simulation from last sa</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="imp_sample"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">imp_sample</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">n</span>,
        <span class="sig-arg">data</span>,
        <span class="sig-arg">w</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.imp_sample">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Importance sampling
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>returns a sample of size n</dd>
  </dl>
</td></tr></table>
</div>
<a name="mcmc_run"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">mcmc_run</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">data</span>,
        <span class="sig-arg">t</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">likvariance</span>=<span class="sig-default">10</span>,
        <span class="sig-arg">burnin</span>=<span class="sig-default">1000</span>,
        <span class="sig-arg">nopool</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">method</span>=<span class="sig-default">&quot;MH&quot;</span>,
        <span class="sig-arg">constraints</span>=<span class="sig-default">[]</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.mcmc_run">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  MCMC based fitting
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>data</code></strong> - : observed time series on the model's output</li>
        <li><strong class="pname"><code>t</code></strong> - : length of the observed time series</li>
        <li><strong class="pname"><code>likvariance</code></strong> - : variance of the Normal likelihood function</li>
        <li><strong class="pname"><code>nopool</code></strong> - : True if no priors on the outputs are available. Leads to faster calculations</li>
        <li><strong class="pname"><code>method</code></strong> - : Step method. defaults to Metropolis hastings</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="_output_loglike"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_output_loglike</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">prop</span>,
        <span class="sig-arg">data</span>,
        <span class="sig-arg">likfun</span>=<span class="sig-default">like.Normal</span>,
        <span class="sig-arg">likvar</span>=<span class="sig-default">1e-1</span>,
        <span class="sig-arg">po</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld._output_loglike">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Returns the log-likelihood of a simulated series
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>prop</code></strong> (: array of shape (t,nphi) with series as columns.) - : Proposed output</li>
        <li><strong class="pname"><code>data</code></strong> (: Dictionary with keys being the names (as in phinames) of observed variables) - : Data against which proposal will be measured</li>
        <li><strong class="pname"><code>likfun</code></strong> (: Log likelihood function object) - : Likelihood function</li>
        <li><strong class="pname"><code>likvar</code></strong> - : Variance of the likelihood function</li>
        <li><strong class="pname"><code>po</code></strong> - : Pool of processes for parallel execution</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="sir"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sir</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">data</span>=<span class="sig-default">{}</span>,
        <span class="sig-arg">t</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">variance</span>=<span class="sig-default">0.1</span>,
        <span class="sig-arg">pool</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">savetemp</span>=<span class="sig-default">False</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.sir">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Run the model output through the Sampling-Importance-Resampling algorithm.
Returns 1 if successful or 0 if not.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>data</code></strong> - : observed time series on the model's output</li>
        <li><strong class="pname"><code>t</code></strong> - : length of the observed time series</li>
        <li><strong class="pname"><code>variance</code></strong> - : variance of the Normal likelihood function</li>
        <li><strong class="pname"><code>pool</code></strong> - : False if no priors on the outputs are available. Leads to faster calculations</li>
        <li><strong class="pname"><code>savetemp</code></strong> - : Boolean. create a temp file?</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="runModel"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">runModel</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">savetemp</span>,
        <span class="sig-arg">t</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">k</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#Meld.runModel">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Handles running the model k times keeping a temporary savefile for
resuming calculation in case of interruption.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>savetemp</code></strong> - : Boolean. create a temp file?</li>
        <li><strong class="pname"><code>t</code></strong> - : number of time steps</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd><ul class="rst-simple">
<li>self.phi: a record array of shape (k,t) with the results.</li>
</ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="trunk.BIP-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/bayesian-inference">Project Homepage</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Jan 26 15:29:58 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
